package com.kehongborui.fliggy.controller;

import com.kehongborui.fliggy.model.PassStationModel;
import com.kehongborui.fliggy.model.ResultModel;
import com.kehongborui.fliggy.service.PassStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-08-28
 */
@RestController
@RequestMapping("/pass_station")
public class PassStationController {
    @Autowired
    private PassStationService passStationService;

    @GetMapping
    public ResultModel findPassStationByVehicleNo(String vehicleNo) {
        List<PassStationModel> passStationModels = passStationService.findPassStationByVehicleNo(vehicleNo);
        return ResultModel.OK(passStationModels);
    }
}
